package gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

public class InvalidSyncPanelImpl {
	private Button okBtn;
	private Label message;
	private Display display;
	private Shell shell;

	public InvalidSyncPanelImpl(Display display, Shell shell) {
		this.display = display;
		this.shell = shell;
	}

	/**
	 * Open the window.
	 */
	public void open() {
		shell.setSize(225, 150);
		shell.setText("SWT Application");
		
		message = new Label(shell, SWT.CENTER);
		message.setBounds(10, 10, 189, 38);
		message.setText("Invalid Database Synchronization");
		message.setFont(new Font(display, "Arial", 12, SWT.None));
		
		okBtn = new Button(shell, SWT.NONE);
		okBtn.setBounds(63, 79, 75, 25);
		okBtn.setText("OK");

		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

}
